package com.eeb.dropwizardmongo.example.api;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotBlank;
import org.mongojack.MongoCollection;
import org.mongojack.ObjectId;

@JsonIgnoreProperties(ignoreUnknown = true)
@MongoCollection(name = "badges")
public class Badge {

    @JsonProperty("_id")
    private String _id;

    @NotBlank
    @JsonProperty("content")
    private String content;

    @NotBlank
    @JsonProperty("name")
    private String name;

    @NotBlank
    @JsonProperty("color")
    private String color;

    public Badge() {  }

    public Badge(@ObjectId String _id, String content, String name, String color) {
        this._id = _id;
        this.content = content;
        this.name = name;
        this.color = color;
    }

    @ObjectId
    public String get_id() {
        return _id;
    }

    public void set_id(String _id) {
        this._id = _id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

}
